package com.whut.whw.chat;

import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.TextView;

import com.whut.whw.R;
import com.whut.whw.base.BaseActivity;
import com.whut.whw.base.UiDelegate;

import butterknife.BindView;

public class ChatWinActivity extends BaseActivity {

    @BindView(R.id.toolbar)
    Toolbar toolbar;

    @BindView(R.id.toolbar_title)
    TextView toolbar_title;

    @Override
    public int getLayoutId() {
        return R.layout.activity_conversation;
    }

    @Override
    public void initData(Bundle savedInstanceState) {
        setToolbar();
    }
    public void setToolbar(){
        String sName=getIntent().getData().getQueryParameter("title");//获取昵称
        getUiDelegate().toastLong(sName);
        toolbar_title.setText(sName);
        toolbar.inflateMenu(R.menu.activity_chat_nav_menu);
        toolbar.setNavigationIcon(R.drawable.rc_back_icon);
    }

    @Override
    public void setListener() {
        toolbar.setNavigationOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ChatWinActivity.this.finish();
            }
        });
    }
}
